package org.wang.step1.chapter3;

/**
 * 如果构造线程对象时未传入ThreadGroup，Thread会默认获取父线程的ThreadGroup作为该线程的ThreadGroup，此时子线程和父线程将会在同一个threadGroup中
 *
 *
 * @description:
 * @author: XG.SUN
 * @create: 2021-09-18 21:46
 **/
public class CreateThread2 {
    public static void main(String[] args) {
        Thread thread = new Thread();
        thread.start();
        System.out.println(thread.getThreadGroup());
  //      System.out.println(thread.getThreadGroup());
        System.out.println(Thread.currentThread().getName());
    }

}
